Efficient parameter extraction of photovoltaic models with a novel enhanced prairie dog optimization algorithm

The growing demand for solar energy conversion underscores the need for precise parameter extraction methods in photovoltaic (PV) plants. This study focuses on enhancing accuracy in PV system parameter extraction, essential for optimizing PV models under diverse environmental conditions. Utilizing primary PV models (single diode, double diode, and three diode) and PV module models, the research emphasizes the importance of accurate parameter identification. In response to the limitations of existing metaheuristic algorithms, the study introduces the enhanced prairie dog optimizer (En-PDO). This novel algorithm integrates the strengths of the prairie dog optimizer (PDO) with random learning and logarithmic spiral search mechanisms. Evaluation against the PDO, and a comprehensive comparison with eighteen recent algorithms, spanning diverse optimization techniques, highlight En-PDO’s exceptional performance across different solar cell models and CEC2020 functions. Application of En-PDO to single diode, double diode, three diode, and PV module models, using experimental datasets (R.T.C. France silicon and Photowatt-PWP201 solar cells) and CEC2020 test functions, demonstrates its consistent superiority. En-PDO achieves competitive or superior root mean square error values, showcasing its efficacy in accurately modeling the behavior of diverse solar cells and performing optimally on CEC2020 test functions. These findings position En-PDO as a robust and reliable approach for precise parameter estimation in solar cell models, emphasizing its potential and advancements compared to existing algorithms.


Overview of prairie dog optimizer
The Prairie dog optimizer (PDO), introduced in 2022, simulates prairie dogs' foraging and burrow-building behaviors for optimization purposes 20 .It begins with a random search pattern to identify the region of interest and emphasizes exploration and exploitation during the updating process.The optimization process involves three mathematical phases, namely initialization and evaluation, exploration and exploitation.PDO initializes a colony of Q coteries, each containing N prairie dogs with position vectors.The colony is represented by a matrix C , and each coterie by a matrix PA .Initialization is done using uniform distribution.
Fitness evaluation is based on the objective function, aiming for the minimum fitness value within the colony.Prairie dogs explore (exploration phase) using Levy flight and digging strength to find new solutions.The position updates are modeled as follows: (1) C ij = P Lb j + U(0, 1).P Ub j − P Lb j (2) P ij = P lb j + U(0, 1).P ub j − P ub j (3) P i+1,j+1 = P best,j + C best,i,j × ρ − Z i,j × Levy(n) ∀t < T max /4 (4) P i+1,j+1 = P best,j + P r,j × DS × Levy(n) ∀T max /4 ≤ t < T max /2 where ρ , C best,i,j , P r,j , Z i,j , Ds and Levy(n) are the food source alert parameter, the effects of the most effective solution, a randomly created solution, the random cumulative influence of each prairie dog inside the colony, the coterie's strength in digging and Levy distribution function 20 .
The exploitation phase involves simulating prairie dogs' communication skills.Position updates are modeled as: where ε , Pe and rand are a small number to illustrate the goodness of food source, the effects of the predator and a random value between 0 and 1 generated by the uniform distribution, respectively.The PDO framework (model of the exploration and exploitation phases) is represented in Fig. 1.

Proposed enhanced prairie dog optimizer
This study proposes an enhanced version of the PDO (En-PDO) by incorporating the random learning (RL) and logarithmic spiral search (LSS) mechanisms into the original PDO.The RL mechanism is a machine learning technique used to improve the exploration capacity 45 .The RL mechanism can be described as x RL i (t) = x best (t) + rand × (x i (t) − x k1 (t)) for f k1 < f k2 and f k1 < f k3 ; x RL i (t) = x best (t) + rand × (x i (t) −x k2 (t)) for f k2 < f k1 and f k2 < f k3 ; x RL i (t) = x best (t) + rand × (x i (t) − x k3 (t)) for the rest of the relationships between fitness functions ( f k1 , f k2 and f k3 ) of random individuals ( x k1 (t) , x k2 (t) and x k3 (t) ) by assuming x best as the optimal solution and x i (t) as the i th individual in the t th iteration's population.This study also adopts LSS mechanism 46 which can be expressed with x Ls i (t) = |x best (t) − x i (t)| • e αl • cos (2πl) + x best (t) where l is a random variable within the range [−1, 1] , calculated as l = 2 × rand − 1 , α is a constant set to 1 , shaping the spiral, and x best (t) represents the optimal position in the current iteration.Figure 2 demonstrates the searching principles of the RL and LSS mechanisms employed in this study.
The proposed En-PDO algorithm incorporates a selective structure, as well, for further enhancing the performance.As part of the latter approach, the position update is performed as follows.The current solution, x i (t) , is replaced by the newly obtained solution, x Ls i (t) , in the event that x i (t) exhibits equal or superior fitness.
(5)  Otherwise, x i (t) remains within the population.This selection mechanism effectively prevents the retention of suboptimal solutions.In essence, superior new solutions are continually refined over successive iterations, while inferior ones are systematically discarded.Figure 3 provides a detailed flowchart of the proposed En-PDO algorithm.As can be observed from this flowchart, the En-PDO starts with the original PDO then the best solution is further processed using RL or LSS mechanisms.The adoption of the latter two mechanisms is decided randomly by providing equal chances two those mechanisms.In this way, an efficient structure that can be used for the parameter extraction of the PV models is achieved.

Performance assessment of proposed En-PDO on CEC2020 test functions
To evaluate the efficacy of the proposed En-PDO, a comprehensive analysis was conducted using the CEC2020 benchmark test functions.The experimental setup involved 30 independent runs with a population size of 50 and a total of 1000 iterations for each algorithm.Table 1 provides a summary of the CEC2020 test functions utilized in the assessment.These functions vary in type, name, lower and upper bounds, and the global optimum.The En-PDO algorithm was tested against the PDO on these diverse functions.
Table 2 presents the statistical performance evaluation for unimodal and basic function types.The results highlight the minimum, maximum, mean, standard deviation, and the p-value from Wilcoxon's signed-rank test for both En-PDO and PDO on each function.Notably, the En-PDO consistently outperformed PDO, evident in its lower mean and significant p-values, asserting its superiority.
Table 3 extends the evaluation to hybrid and composition function types.En-PDO's performance is once again evident, demonstrating lower mean values, smaller standard deviations, and consistently significant p-values compared to PDO.The statistical outcomes affirm the superior performance of En-PDO across a diverse range of CEC2020 functions.
The consistent dominance of En-PDO across various function types underscores its efficacy in achieving competitive and reliable optimization results.The algorithm's ability to navigate both unimodal and more complex hybrid and composition functions positions En-PDO as a robust optimization tool.These findings showcase the potential of En-PDO for addressing optimization challenges across different problem domains, making it a promising choice for practical applications.

Single-diode model
The single-diode (SD) model offers a simplified mathematical representation of the electrical characteristics exhibited by a PV cell.Despite its simplicity, the SD model manages to capture the essential aspects of the PV cell's electrical response while providing a computationally efficient representation.In the SD model, the current-voltage (I-V) relationship of a PV cell is defined by the following equation: where I is the output current of the PV cell, V is the voltage across the PV cell terminals, I ph is the photocurrent generated by the cell under illumination, I sd is the diode saturation current, R s is the series resistance of the cell, R sh is the shunt resistance of the cell, n is the diode ideality factor, V t is the thermal voltage, approximately equal (7)   www.nature.com/scientificreports/ to kT/q , where k is Boltzmann's constant, T is the temperature in Kelvin, and q is the elementary charge.Figure 4 illustrates the conceptual depiction of a solar PV cell employing the single-diode model.

Double-diode model
The double-diode (DD) model represents an advanced approach to PV cell modeling that incorporates additional diodes to capture more complex electrical behavior.In the DD model, the current-voltage (I-V) relationship of a PV cell is defined by the following equation: where I sd1 is the diode saturation current of the main diode, I sd2 is the diode saturation current of the additional diode, n 1 is the ideality factor of the main diode and n 2 is the ideality factor of the additional diode.Figure 5 illustrates the conceptual depiction of a solar PV cell employing the DD model.

Three-diode model
The three-diode (TD) model is an advanced representation of a PV cell that provides a more accurate description of its behavior compared to simpler models.In this model, the current-voltage relationship is given as where I d1 is the current through the ideal diode; I d2 is the current through the recombination diode and I d3 is the current through the shunt diode.Considering this explanation, the overall current through the PV cell can be calculated by summing up the currents through the three diodes in TD model: where n 1 , n 2 and n 3 are the ideality factors of the diodes D 1 , D 2 and D 3 , respectively.Figure 6 illustrates the equivalent circuit of a solar PV cell employing the three-diode model.

Photovoltaic module model
The photovoltaic (PV) module model captures the relationship between the incident solar irradiance, temperature, and the electrical characteristics of the module.The model assumes that the PV module can be represented as a single diode connected in parallel with a current source.Figure 7 represents the equivalent circuit of a PV module where N p and N s are denoting the number of cells in parallel and series respectively.Since the solar cells are connected in series largely, the N p value equals to 1. Therefore, the mathematical model of a PV module can be represented as follows.

Proposed novel method
It is crucial to represent the parameter estimation as an optimization problem by adopting an objective function in order to analyze a solar system accurately.In this study, the root mean square error (RMSE), given in the following equation, is used as the objective function ( F Obj ) to calculate the difference between the measured current ( I m ) and estimated current ( I c ) values.( 9)  Here, N represents the total number of data points.To estimate the current, the nonlinear equations derived from the equivalent circuits can be solved.In the conventional objective function, given a voltage measurement and a current measurement, the current is estimated using the following expression: Substituting Eq. ( 12) into Eq.( 11), will lead to following for the SD model.
For the DD model, this will be: For the TD model, this will be: For the PV module model, this will be: Substituting ( I = I m ) in Eq. (11) to estimate the current would yield inaccurate results due to the nonlinear characteristics of the models.To solve these nonlinear equations various methods can be employed, such as the Taylor series, Newton-Raphson method, Lambert W function, and others 47 .In this study, the iterative Newton-Raphson method was utilized.This method offers notable advantages, including high accuracy and relatively low computational burden.The optimization algorithm is implemented in conjunction with the Newton-Raphson method, ensuring their coordination throughout the process.Figure 8 showcases the process of parameter extraction by combining the Newton-Raphson method with the En-PDO algorithm.
The Newton-Raphson method is an iterative procedure that requires an initial point, x 0 , and a termination condition.After k iterations, the updated solution is given by x k+1 = x k − f (x)/f ′ (x) .The final solution is achieved when the absolute value of f (x) is less than a predefined tolerance, ε .For the SD and DD models, the current is computed according to Eqs. ( 17) and (18), respectively, by solving the nonlinear equations f (x) and g(x) , where x represents I.This method is utilized to compute the value of the objective function during the parameter optimization process.Throughout the optimization, the algorithm communicates the solar PV cell variables to the Newton-Raphson method, which calculates the objective function value.Specifically, the Newton-Raphson method is employed to solve the nonlinear equations in Eqs. ( 17) and ( 18) at a specific voltage, resulting in output current values with an error ( ε ) below 10 −4 .There are two significant challenges in this process.Firstly, the choice of the initial point strongly influences the final solution.Secondly, minimizing the execution time is crucial.These challenges can be overcome by a simple step.The measured current is selected as the starting point because the estimated current is expected to be close to the measured current.

Simulation results and discussion
For the simulations of parameter extraction, we set the population size to 30 and the maximum number of iterations to 400.The algorithms were executed 30 times for each case study.We have used SD, DD and TD models of the R.T.C. France silicon solar cell along with the Photowatt-PWP201 PV model in order to demonstrate the efficacy of the proposed En-PDO for accurate extraction of related parameters.

Simulation results of SD model
Initial evaluation of the proposed En-PDO is performed using the SD model of the commercially available and widely adopted commercial R.T.C. France silicon solar cell.The specifications of the SD model parameters employed for this study are presented in Table 4.
The data in Table 5 highlights the effectiveness of the En-PDO in estimating SD model parameters compared to the PDO.The En-PDO consistently produces more accurate results with smaller RMSE across all parameters.The presented data strongly supports the efficacy of the En-PDO algorithm in accurately estimating parameters.Its consistently superior performance, smaller RMSE values, and improved stability make it a compelling choice for parameter extraction tasks.
Figure 9 showcases the convergence behavior of the PDO and En-PDO algorithms when applied to the SD model of the commercially available R.T.C France solar cell.Examining the convergence curves, we observe that both algorithms exhibit a trend towards decreasing RMSE values.However, it is evident that the proposed En-PDO outperforms the standard PDO by consistently achieving the lowest RMSE value and attaining the best solution in earlier iterations.
Figures 10 and 11 showcase the I-V and P-V characteristics, respectively, based on the estimated parameters derived from both the PDO and En-PDO.These figures demonstrate a remarkable agreement between the estimated data and the experimental data across the entire voltage range.This close match validates the accuracy of the En-PDO in capturing the behavior of the SD model.
To further emphasize the superiority of the En-PDO, Fig. 12 presents the absolute error values for different data points in the SD model.It is evident that the En-PDO consistently achieves lower error values compared (18) Boundaries of parameters for SD model.

Parameter Lower bound Upper Bound
I ph (A) 0 1

Simulation results of DD model
The evaluation of the proposed En-PDO algorithm is also performed using the DD model of the commercially available and widely adopted commercial R.T.C. France silicon solar cell.The specifications of the DD model parameters employed for this study are presented in Table 6.
The data presented in Table 7 highlights the efficacy of the En-PDO algorithm in estimating parameters compared to the PDO algorithm for the DD model.The RMSE values emphasize the superior performance of the    13 showcases the convergence behavior of the standard PDO and proposed En-PDO when applied to the DD model of the commercially available R.T.C France solar cell.Examining the convergence curves, we observe that both algorithms exhibit a trend towards decreasing RMSE values.However, it is evident that the proposed En-PDO outperforms the standard PDO by consistently achieving the lowest RMSE value and attaining the best solution.
Figures 14 and 15 showcase the I-V and P-V characteristics, respectively, based on the estimated parameters derived from both the PDO and En-PDO.These figures demonstrate a remarkable agreement between the estimated data and the experimental data across the entire voltage range.This close match validates the accuracy of the En-PDO in capturing the behavior of the DD model.To further emphasize the superiority of the En-PDO, Fig. 16 presents the absolute error values for different data points in the DD model.It is evident that the En-PDO consistently achieves lower error values compared to the PDO.This observation solidifies the enhanced performance of the En-PDO in accurately estimating the parameters of the DD model for the solar cell.

Simulation results of TD model
The proposed En-PDO is further assessed using the TD model of the commercially available and widely adopted commercial R.T.C. France silicon solar cell.The specifications of the TD model parameters employed for this study are presented in Table 8.
The data presented in Table 9 highlights the efficacy of the En-PDO algorithm in estimating parameters compared to the PDO for the TD model.The RMSE values emphasize the superior performance of the En-PDO.The En-PDO consistently yields smaller mean RMSE values compared to the PDO suggesting better fit to the observed data and delivering more precise parameter estimates for the TD model.
Figure 17 showcases the convergence behavior of the standard PDO and proposed En-PDO when applied to the TD model of the commercially available R.T.C France solar cell.Examining the convergence curves, we observe that both algorithms exhibit a trend towards decreasing RMSE values.However, it is evident that the proposed En-PDO outperforms the standard PDO by consistently achieving the lowest RMSE value and attaining the best solution in later iterations.This highlights its better performance in achieving the best solution.
Figures 18 and 19 showcase the I-V and P-V characteristics, respectively, based on the estimated parameters derived from both the PDO and En-PDO.These figures demonstrate a remarkable agreement between the estimated data and the experimental data across the entire voltage range.This close match validates the accuracy of the En-PDO in capturing the behavior of the TD model.To further emphasize the superiority of the En-PDO,

Simulation results of PV module model
The last assessment for the proposed En-PDO is performed using the PV model of the Photowatt-PWP201 solar cell.The specifications of the PV model parameters employed for this study are presented in Table 10.
The data presented in Table 11 highlights the efficacy of the En-PDO in estimating parameters compared to the PDO for the PV model.The RMSE values emphasize the superior performance of the En-PDO.The En-PDO consistently yields smaller mean RMSE values compared to the PDO suggesting better fit to the observed data and delivering more precise parameter estimates for the module model.www.nature.com/scientificreports/ Figure 21 showcases the convergence behavior of the standard PDO and proposed En-PDO when applied to the PV model of the Photowatt-PWP201 solar cell.Examining the convergence curves, we observe that both algorithms exhibit a trend towards decreasing RMSE values.However, it is evident that the proposed En-PDO outperforms the standard PDO by consistently achieving the lowest RMSE value and attaining the best solution highlighting its better performance in achieving the best solution.
Figures 22 and 23 showcase the I-V and P-V characteristics, respectively, based on the estimated parameters derived from both the PDO and En-PDO.These figures demonstrate a remarkable agreement between the estimated data and the experimental data across the entire voltage range.This close match validates the accuracy of the En-PDO in capturing the behavior of the PV module model.To further emphasize the superiority of the En-PDO, Fig. 24 presents the absolute error values for different data points in the PV module model.It is evident that the En-PDO consistently achieves lower error values compared to the PDO.This observation solidifies the enhanced performance of the En-PDO in accurately estimating the parameters of the PV model for the Photowatt-PWP201 solar cell.
Table 12 provides a comprehensive comparison of the RMSE values for each algorithm across different models, including PV module model (Photowatt-PWP201) as well as SD, DD and TD models (R.T.C.France solar Voltage (V) cell).Comparing En-PDO with other algorithms, it is evident that En-PDO consistently achieves competitive or superior performance in terms of RMSE values across all models.Notable achievements include the lowest RMSE values in the SD, DD, TD and PV models, demonstrating the efficacy of En-PDO in accurately modeling the behavior of different solar cells.The significant numerical results and the consistently superior performance of En-PDO across various models underscore its potential as an advanced optimization algorithm for photovoltaic modeling.These outcomes position En-PDO as a promising and reliable choice for optimizing parameters in the solar energy domain, showcasing its relevance and superiority compared to the array of recently reported algorithms.

Conclusion
In this study, the focus was on advancing the accuracy of PV system parameter extraction, a critical aspect of optimizing PV models.Recognizing the challenges posed by real-world operational conditions, aging effects, and the lack of instrumentation, the research underscores the significance of precise parameter identification for enhancing PV system efficiency.The primary PV models, including the SD, DD, and TD models, along with the PV module model, were investigated.The aim was to augment the accuracy of parameter identification, considering the complexities associated with diverse environmental conditions.Analytical methods, numerical operations, and metaheuristic algorithms were reviewed, with a particular focus on the limitations of existing metaheuristic algorithms.To address these limitations, the study introduced the En-PDO, a novel algorithm integrating the strengths of the PDO with RL and LSS mechanisms.The evaluation against the original PDO, coupled with a comprehensive comparison involving eighteen recent algorithms, showcased En-PDO's exceptional performance across different solar cell models and CEC2020 test functions.Application of En-PDO to SD, DD, TD, and PV module models, using standard experimental datasets and CEC2020 test functions, consistently demonstrated its superiority.The algorithm achieved competitive or superior root mean square error values, indicating its efficacy in accurately modeling the behavior of various solar cells and performing optimally on CEC functions.The key contributions of this work lie in the development and validation of En-PDO as an advanced optimization algorithm for accurate parameter estimation in solar cell models.The algorithm's innovative design, integrating nature-inspired behaviors with learning mechanisms, positions it as a robust and reliable tool for addressing the challenges of PV system parameter extraction.Future research directions could include hybridizing En-PDO with other metaheuristic algorithms, exploring adaptability to dynamic environments, extending to multi-objective optimization, assessing scalability and parallelization capabilities, implementing in real-time applications, handling uncertainties, collaborative optimization in solar energy systems, application to emerging photovoltaic technologies, developing user-friendly interfaces, and contributing to benchmarking and standardization efforts.These avenues hold promise for advancing the field of optimization algorithms in the context of solar energy, addressing emerging challenges, and facilitating widespread adoption in both research and practical applications.

Figure 6 .
Figure 6.Equivalent circuit of TD model.

Figure 7 .
Figure 7. Equivalent circuit of PV module model.

Figure 8 .
Figure 8. Parameter estimation process with the combination of En-PDO algorithm and Newton-Raphson technique.

Figure 12 .
Figure 12.Absolute current error values for different data points in SD model.

Figure 13 .Figure 14 .
Figure 13.Convergence curves of En-PDO and PDO algorithms for DD model.

Figure 17 .Figure 18 .
Figure 17.Convergence curves of En-PDO and PDO algorithms for TD model.

Figure 19 .
Figure 19.P-V curve characteristics of TD model.

Figure 20 .
Figure 20.Absolute current error values for various data points in TD model.

Table 1 .
Descriptions of CEC2020 test functions.

Table 2 .
Statistical performance evaluation of unimodal and basic function types.

Table 3 .
Statistical performance evaluation of hybrid and composition function types.

Table 5 .
Estimated Convergence curves of En-PDO and PDO algorithms for SD model.to the PDO.This observation solidifies the enhanced performance of the En-PDO in accurately estimating the parameters of the SD model for the solar cell.Overall, the combination of Figs. 10, 11, and 12 provides strong evidence of the efficacy of the En-PDO for accurately modeling the SD characteristics of the R.T.C. France silicon solar cell.

Table 6 .
Boundaries of parameters for DD model.

Table 8 .
Boundaries of parameters for TD model.

Table 9 .
Estimated parameters and statistical RMSE values for TD model with En-PDO and PDO algorithms.Significant values are in [bold].

Table 11 .
Estimated parameters and statistical RMSE values for PV module model with En-PDO and PDO algorithms.Significant values are in [bold].

Table 12 .
Comparison of RMSE values.Significant values are in [bold].